package pers.cz.service;

import pers.cz.model.DatabaseDesign;
import pers.cz.model.DatabaseDesignConfig;
import pers.cz.model.DatabaseDesignDtlWithBLOBs;

import java.util.List;

/**
 * @program: PostGirl-panent
 * @description: 数据建模
 * @author: Cheng Zhi
 * @create: 2022-08-14 15:33
 **/
public interface DatabaseDesignService {

    public List<DatabaseDesign> getAllDatabaseDesignByUserId(Integer userId);
    public Integer addNode(DatabaseDesign databaseDesign);
    public Integer updateNode(DatabaseDesign databaseDesign);
    public Integer deleteNode(DatabaseDesign databaseDesign);

    public DatabaseDesignDtlWithBLOBs getDatabaseDesignDtlById(Integer id);
    public Integer addDtl(DatabaseDesignDtlWithBLOBs databaseDesignDtlWithBLOBs);
    public Integer removeDtl(Integer id);
    public Integer modifyDel(DatabaseDesignDtlWithBLOBs databaseDesignDtlWithBLOBs);
    public Integer addDtlAndNode(DatabaseDesignDtlWithBLOBs databaseDesignDtlWithBLOBs, DatabaseDesign databaseDesign);

    public Integer addConf(DatabaseDesignConfig databaseDesignConfig);
    public Integer udpateConf(DatabaseDesignConfig databaseDesignConfig);
    public Integer deleteConf(Long id);
    public List<DatabaseDesignConfig> queryConfs();
    public Integer addField(DatabaseDesignConfig databaseDesignConfig);
    public Integer updateField(DatabaseDesignConfig databaseDesignConfig);
    public Integer deleteField(DatabaseDesignConfig databaseDesignConfig);
}
